package com.blb.community.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.community.entity.ZyRoom;
import com.blb.community.mapper.ZyRoomMapper;
import com.blb.community.service.IZyRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 房间  服务实现类
 * </p>
 *
 * @author 帅帅
 * @since 2022-07-02
 */
@Service
public class ZyRoomServiceImpl extends ServiceImpl<ZyRoomMapper, ZyRoom> implements IZyRoomService {

    @Autowired
    private ZyRoomMapper zyRoomMapper;

    @Override
    public List<ZyRoom> selectzyroom() {
        return zyRoomMapper.selectzyroom();
    }

    /**
     * 分页查询
     * @param current
     * @param size
     * @return
     */
    @Override
    public IPage<ZyRoom> selectRoomPage(Long current, Long size) {
        return zyRoomMapper.selectRoomPage(new Page<ZyRoom>(current,size));
    }

    @Override
    public IPage<ZyRoom> fuzzyPage(Long current, Long size, String roomStatus, String communityName, String unitName, String buildingName) {
        return zyRoomMapper.fuzzyPage(new Page<ZyRoom>(current,size),roomStatus,communityName,unitName,buildingName);
    }
}
